import request from "@/utils/request";
import { AxiosPromise } from "axios";
import { WorkPlanVO, WorkPlanForm } from "./types";

/**
 * 新增排版计划
 *
 * @param data {LoginData}
 * @returns
 */
export function getList(data: WorkPlanForm): AxiosPromise<Array<WorkPlanVO>> {
  return request({
    baseURL: "http://localhost:8888",
    url: "/system/work/plan/list",
    method: "post",
    data: data,
  });
}
/**
 * 新增排版计划
 *
 * @param data {LoginData}
 * @returns
 */
export function saveBatch(data: WorkPlanVO[]): AxiosPromise<Boolean> {
  return request({
    baseURL: "http://localhost:8888",
    url: "/system/work/plan/save/batch",
    method: "post",
    data: data,
  });
}
